package com.yz.antlr.csv.impstand;

import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;

/**
 * @author yanzhao
 * @version 1.0
 * TODO
 * @date 2022/3/28 19:43
 */
public class CsvErrCheck extends BaseErrorListener {
    @Override
    public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
//        super.syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, e);

        System.out.println(recognizer);
        System.out.println(offendingSymbol);
        System.out.println(line);
        System.out.println(charPositionInLine);
        System.out.println(msg);
        System.out.println(e != null ? e.getMessage() : e);
    }
}
